package com.zbkj.crmeb.agent.model;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 服务商资金流水表
 * </p>
 *
 * @author wuzp
 * @since 2022-02-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("eb_agent_account_flow")
@ApiModel(value="AgentAccountFlow对象", description="服务商资金流水表")
public class AgentAccountFlow extends Model<AgentAccountFlow> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "服务商id")
    private Integer agentId;

    @ApiModelProperty(value = "第三方主键id")
    private Integer otId;

    @ApiModelProperty(value = "操作人id")
    private Integer operateId;

    @ApiModelProperty(value = "操作人ip")
    private String operateIp;

    @ApiModelProperty(value = "交易类型(1: 商品购买与退款 2: 提现)")
    private Integer tradeType;

    @ApiModelProperty(value = "可提现交易金额(正数进, 负数出)")
    private BigDecimal withdrawAccount;

    @ApiModelProperty(value = "冻结交易金额(正数进, 负数出)")
    private BigDecimal freezeAccount;

    @ApiModelProperty(value = "当前可提现余额")
    private BigDecimal nowWithdrawAccount;

    @ApiModelProperty(value = "当前冻结金额")
    private BigDecimal nowFreezeAccount;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
